/*
 * @Description: 联系人管理
 * @Author: wws1993
 * @Date: 2020-12-02 16:15:09
 * @LastEditTime: 2020-12-03 15:21:28
 * @LastEditors: wws1993
 * @FilePath: \todoManager\src\service\MailModal.ts
 */

import BaseModal from './BaseModal';

class MailModal extends BaseModal {
  constructor() {
    super('MAILPERSONS');
  }

  /** 保存管理器实例
   * @param params 表单
   */
  public save(params: any) {
    return params.id
      ? this.update(params)
      : this.create(params);
  }

  /** 查 */
  public request(params?: API.params.TodoManageModal.Query): Promise<any[] | null> {
    return this.query() as Promise<Manage.Instance[] | null>;
  }
}

export default new MailModal();
